//
//  RankListCell.m
//  A段项目音乐播放
//
//  Created by 太阳 on 15/5/27.
//  Copyright (c) 2015年 lanou3g.com蓝鸥科技. All rights reserved.
//

#import "RankListCell.h"
#import "myButton.h"
@implementation RankListCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self builtInterface];
        self.selectionStyle = UITableViewCellEditingStyleNone;
    }
    return self;
}
- (void)awakeFromNib {
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];


}

- (void)builtInterface
{
    self.addButton = [myButton buttonWithType:UIButtonTypeSystem];
    self.addButton.frame = CGRectMake(5, 5, 50, 50);

    [self.contentView addSubview:self.addButton];
    self.songnameLabel = [[[UILabel alloc]initWithFrame:CGRectMake(60, 5, 250, 20)] autorelease];
    
    [self.contentView addSubview:self.songnameLabel];
    self.collectButton = [myButton buttonWithType:UIButtonTypeSystem];

    self.collectButton.frame = CGRectMake([UIScreen mainScreen].bounds.size.width - 55, 5, 50, 50);
    self.singerLabel = [[UILabel alloc]initWithFrame:CGRectMake(60, 28, 200, 20)];
    self.singerLabel.textColor = [UIColor colorWithWhite:0.5 alpha:0.4];
    [self.contentView addSubview:self.singerLabel];
    
    
    UIImage *like = [UIImage imageNamed:@"dontlike.png"];
    like = [like imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    UIImageView *likeview = [[[UIImageView alloc]initWithFrame:CGRectMake(15, 15, 20, 20)] autorelease];
    likeview.image = like;
    [self.collectButton addSubview:likeview];
    UIImage *image = [UIImage imageNamed:@"add.png"];
    image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    UIImageView *imageview = [[[UIImageView alloc]initWithFrame:CGRectMake(15, 15, 20, 20)] autorelease];
    imageview.image = image;
    [self.addButton addSubview:imageview];
    [self.contentView addSubview:self.collectButton];
}


@end
